package org.mozhu.zufang.system.group.repository;

import org.mozhu.mboot.core.data.BaseRepository;
import org.mozhu.zufang.system.group.entity.Group;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * 分组 - 数据访问层接口
 * 
 * @author mozhu
 */
public interface GroupRepository extends BaseRepository<Group, Long> {

	@Query("select id from Group where defaultGroup=true and activated=true")
	List<Long> findDefaultGroupIds();
	
	@Query("select id from Group where activated=true")
	List<Long> findAllActivatedGroupIds();
}
